xen/arm: traps: Don't inject a fault if the translation VA -> IPA fails
authorJulien Grall <julien.grall@arm.com>
Wed, 27 Jul 2016 16:37:11 +0000 (17:37 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 3 Aug 2016 19:47:08 +0000 (15:47 -0400)
commit730ee51d36a6b2902c01cd39bc0a6156bb5ac4ea
treee6e5bd7b4a116c3c8b8f23a75c070130557a566c
parentf126ce847d44855fd8883f5118718952add97871
xen/arm: traps: Don't inject a fault if the translation VA -> IPA fails

Based on ARM ARM (D4.5.3 in ARM DDI 0486A and B3.12.7 in ARM DDI 0406C.c),
a Stage 1 translation error has priority over a Stage 2 translation error.

Therefore gva_to_ipa can only fail if another vCPU is playing with the
page table.

Rather than injecting a custom fault, replay the instruction and let the
processor injecting the correct fault.

This is fine as Xen is handling all the pending softirqs
(see leave_hypervisor_tail) before returning to the guest. One of them
is the scheduler which could rescheduled the vCPU.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c